﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
    <meta http-equiv="X-UA-Compatible" value="IE=9" />

    <!--DXMETADATA start type="Literal" condition="helpversion:value=3" value="<meta name=""Microsoft.Help.SelfBranded"" content=""true"" />" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="ItemTitle" format="<title>%%ProjectTitle%% - %%ItemTitle%%</title>" --><title>SpreadJS Documentation - Import and Export Excel Files on the Client-Side</title><!--DXMETADATA end-->
    <!--DXMETADATA start type="ItemTitle" format="<meta name=""Title"" content=""%%ProjectTitle%% - %%ItemTitleNoQuotes%%""/>" --><meta name="Title" content="SpreadJS Documentation - Import and Export Excel Files on the Client-Side"/><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="PackageLink" packagename="jquery" filetype="script" firstlinkattributes="id=""mshs_support_script"""--><script src="template/packages/jquery/script/default/jquery-1.11.3.min.js" type="text/javascript" id="mshs_support_script"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="script"--><script src="template/packages/jquery-ui/script/default/jquery-ui-1.11.4.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/jquery-ui/css/default/jquery-ui-1.11.4.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="TemplateSettingsJson" format="<script type=""text/javascript"">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:%%TemplateSettingsJson%%});</script>" --><script type="text/javascript">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:{"dynamictoc":{"initialNodeId":"n321","initialNodeContainer":"c0","isResizable":true},"inthistopic":{"isEnabled":true},"currentLocale":"-","isFrameless":true,"navigationKind":"inpage","versions":{"locale":{"currentId":"-"}}}});</script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="light" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/light/css/dynamic-toc.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="Synopsis" StripHtmlTags="True" MaxLength="250" format="<meta name=""Description"" content=""%%Synopsis%%"" />"--><meta name="Description" content="You can import an Excel file (.xlsx) to JSON and export a JSON object to Excel with the import and export methods on the client-side." /><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="PackageLink" packagename="plugins-topics" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/plugins-topics/css/default/jquery-plugins.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-topics" filetype="css" firstlinkattributes=" data-mshv2-stylesheet=""/template/packages/core-topics/topics.mshv2.css"" data-mshv1-stylesheet=""/template/packages/core-topics/topics.mshv1.css"" data-responsive-mobile=""template/packages/core-topics/topics.mobile.css"" data-responsive-tablet=""template/packages/core-topics/topics.tablet.css"""--><link rel="stylesheet" type="text/css" href="template/packages/core-topics/css/topics.css"  data-mshv2-stylesheet="/template/packages/core-topics/topics.mshv2.css" data-mshv1-stylesheet="/template/packages/core-topics/topics.mshv1.css" data-responsive-mobile="template/packages/core-topics/topics.mobile.css" data-responsive-tablet="template/packages/core-topics/topics.tablet.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="plugins-topics" filetype="script"--><script src="template/packages/plugins-topics/script/default/jquery-plugins.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-topics" filetype="script"--><script src="template/packages/core-topics/script/topics.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="TopicId" format="<meta name=""Microsoft.Help.Id"" content=""%%TopicId%%""/>" --><meta name="Microsoft.Help.Id" content="81f4998e-496a-4fe2-8777-6f0957387451"/><!--DXMETADATA end-->
    <!--DXMETADATA start type="TocParentId" format="<meta name=""Microsoft.Help.TocParent"" content=""%%TocParentId%%""/>" --><meta name="Microsoft.Help.TocParent" content="da8d5ee2-66da-499e-ac0f-b91757afe8e7"/><!--DXMETADATA end-->
    <!--DXMETADATA start type="TocOrdinal" format="<meta name=""Microsoft.Help.TocOrder"" content=""%%TocOrdinal%%""/>" --><meta name="Microsoft.Help.TocOrder" content="10"/><!--DXMETADATA end-->
    <meta name="Microsoft.Help.F1" content=""/>
    <meta name="Microsoft.Help.ContentType" content="Concepts" />
    <!--DXMETADATA start type="MshvKeywords" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="MshvMetaTags" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.Locale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.TopicLocale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Stylesheets" --><link rel="stylesheet" type="text/css" href="stylesheets/hs-simpletab.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="StylePropertyValues" format="<style>%%StylePropertyValues%%</style>" --><style>.i-is-new .i-page-title-text::after, ul#i-dt-root li.i-is-new>a::after { content: "New" }
</style><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scripts" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="DesignTime"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_PROPERTIES" --><!--DXMETADATA end -->
    <!--DXMETADATA start type="CustomHeadContent" --><link rel="stylesheet" type="text/css" href="template/packages/core-web/css/SP.css">
<script type="text/javascript">
var currentHeader = function() {
    return "spjs";
}
</script>
<script src="template/packages/core-web/script/topNavigation.js"></script>
<script async="" src="https://www.googletagmanager.com/gtm.js?id=GTM-WT462SJ"></script>
<script>
        (function (w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime()
                , event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0]
                , j = d.createElement(s)
                , dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', 'GTM-WT462SJ');
    </script>
<!--DXMETADATA end-->
</head>

<body>
    <div id="i-before-header-content" class="i-before-header-content">
        
    </div>

    <div id="i-header-container">
        <div id="i-header-content" class="i-header-content i-content-width-container">
            <!--DXMETADATA start type="LogoImage" --><!--DXMETADATA end-->
            <div class="i-project-title"><!--DXMETADATA start type="ProjectTitle" -->SpreadJS Documentation<!--DXMETADATA end--></div>
            <div class="i-search-container">
                <!--DXMETADATA start type="outputfileextension" format="<form action=""websearch%%outputfileextension%%"">" --><form action="websearch.html"><!--DXMETADATA end-->
                <input id="i-search" name="query"/>
                <input type="submit" id="i-search-button" value=""/>
                <!--DXMETADATA start type="Literal" value="</form>" --></form><!--DXMETADATA end-->
            </div>
            <!--DXMETADATA start type="outputfileextension" format="<a id=""i-index-button"" href=""webindex%%outputfileextension%%""></a>" --><a id="i-index-button" href="webindex.html"></a><!--DXMETADATA end-->
        </div>
    </div>
    
    <div class="i-content-width-container"><div class="i-busy-overlay"></div></div>

    <div id="i-breadcrumbs-outer-container" class="i-content-width-container"><!--DXMETADATA start type="Breadcrumbs" scrap="_BREADCRUMBS" --><div class="i-breadcrumbs-container">
<a href="overview.html">SpreadJS Documentation</a>
 / <a href="devguide.html">Developer's Guide</a>
 / <a href="features.html">Features</a>
 / <a href="managedata.html">Manage Data</a>
 / Import and Export Excel Files on the Client-Side</div><!--DXMETADATA end --></div>

    

    <div id="i-actions-outer-container" class="i-content-width-container">
        <div id="i-actions-container">
            <div id="i-actions-content" class="i-fixed-to-top">
                <!-- Spacing --> <span class="i-toggle-all-sections i-function-link">
                <label class="i-collapse-all"><!--DXMETADATA start type="Phrase" name="COLLAPSE_ALL" -->Collapse All<!--DXMETADATA end--></label>
                <label class="i-expand-all" style="display: none;"><!--DXMETADATA start type="Phrase" name="EXPAND_ALL" -->Expand All<!--DXMETADATA end--></label>
            </span><!--DXMETADATA start type="Literal" condition="communityenabled" value="%%scrap:name=_COMMUNITY_DROPDOWN%%" --><!--DXMETADATA end -->
                <div class="i-in-this-topic-container">
                    <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
                </div>
            </div>
        </div>
    </div>

    <div id="i-toc-outer-container" class="i-content-width-container">
        <div id="i-toc-container">
            <div id="i-toc-content" class="i-fixed-to-top">
                <div class="i-toc-content-scroll-container">
                    <div id="i-dynamic-toc-container"><ul id="i-dt-root"></ul></div>
                </div>
            </div>
        </div>
    </div>

    <div id="i-body-content-container" class="i-content-width-container">
        <div id="i-body-content" class="i-body-content">
            <div class="i-page-title"><div class="i-page-title-text"><!--DXMETADATA start type="ItemTitle" -->Import and Export Excel Files on the Client-Side<!--DXMETADATA end--></div></div>
            <div class="i-in-this-topic-container">
                <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
            </div>
            <!--DXMETADATA start type="TopicSection" name="BodyText"--><p>You can import an Excel file (.xlsx) to JSON and export a JSON object to Excel with the import and export methods on the client-side.</p>

<p>The exported Excel file is locked since the file is from the Internet. The Excel export occurs client-side, not from the server. Downloading on the client-side causes the file to be locked. When you first open the excel file, warning text is displayed.</p>

<div class="i-box i-box-note">
    &lt;!DOCTYPE html&gt; is required to view the widget properly. Also, in order to import and export excel files, users need to reference the file: gc.spread.excelio.*.*.*.min.js
</div>

<p>You can download the Excel file locally or get the returned Excel file (type: blob) to post it to a server.</p>

<p>The following methods are available with the Excel import and export:</p>

<ul>
    <li><a href="SpreadJS~GC.Spread.Excel.IO~open.html">open</a></li>

    <li><a href="SpreadJS~GC.Spread.Excel.IO~save.html">save</a></li>
</ul>

<p>The following table lists the features that are imported or exported from or to an Excel file.</p>

<table>
    <tbody style="MARGIN-LEFT: 30px">
        <tr>
            <th>Category</th>

            <th>Description</th>

            <th>Import (excel to json)</th>

            <th>Export (json to excel)</th>
        </tr>

        <tr>
            <td>
                <p>workbook</p>

                <p>(spread)</p><br />
            </td>

            <td>
                <p>tabstrip:</p>

                <p>tabStripVisible, startSheetIndex, tabStripRatio, tabColor</p>
            </td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>
                <p>scrollbar:</p>

                <p>showHorizontalScrollbar, showVerticalScrollbar</p>
            </td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>
                <p>sheets:</p>

                <p>sheet visible, sheet name</p>
            </td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>Reference style: R1C1 or A1</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>custom name</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>sharedStrings</td>

            <td>the string used for sheet data (common string, string with white spaces)</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>theme</td>

            <td>color scheme</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>font scheme (SpreadJS has no detailed fonts)</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>format scheme (SpreadJS has no format schemes)</td>

            <td>X</td>

            <td>√</td>
        </tr>

        <tr>
            <td>style</td>

            <td>cellStyles: all SpreadJS supported styles</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>different formats (formats used in tables, conditional formats, and filters)</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>tableStyles</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>worksheet</td>

            <td>rowRangeGroup, colRangeGroup</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>rowCount and columnCount</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>gridline visible, gridline color</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>row header and column header visible</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>zoom</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>selections</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>activeRow, activeColumn</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>freeze (frozenRowCount, frozenColumnCount)</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>default rowHeight, default columnWidth</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>columnInfo: column width, column visible, column style</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>merged cells (span)</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>protected sheet</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>rowInfo: row height, row visible, row style</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>cellInfo: cell value, cell formula, cell style</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>custom name</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>conditional format</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>comment</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>picture</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>slicer</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>sparkline</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>table</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>filter</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>validation</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>outline</td>

            <td>√</td>

            <td>√</td>
        </tr>

        <tr>
            <td>&nbsp;</td>

            <td>print</td>

            <td>√</td>

            <td>√</td>
        </tr>
    </tbody>
</table>

<h4>Using Code</h4>

<p>This example opens and saves an Excel file. The first section of code lists the dependencies for the client-side import and export.</p>

<div class="i-filtered-content-JavaScript" data-title="JavaScript" data-itemid="JavaScript">
    <table class="i-syntax-table">
        <tbody>
            <tr>
                <th>JavaScript</th>

                <th>
                    <div class="i-copy-code-wrapper">
                        <span class="i-copy-code">Copy Code</span>
                    </div>
                </th>
            </tr>

            <tr>
                <td class="i-code" colspan="2">
                    <pre>
&lt;script src=<span style="COLOR: #800000">"https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2014-11-29/FileSaver.min.js"</span>&gt;&lt;/script&gt;
    &lt;link href=<span style="COLOR: #800000">"./css/gc.spread.sheets.excel2013white.x.xx.xxxx.x.css"</span> rel=<span style="COLOR: #800000">"stylesheet"</span>/&gt;
    &lt;script src=<span style="COLOR: #800000">"./scripts/gc.spread.sheets.all.x.xx.xxxx.x.min.js"</span> type=<span style="COLOR: #800000">"application/javascript"</span>&gt;&lt;/script&gt;
    &lt;!--For client-side excel i/o--&gt;
    &lt;script src=<span style="COLOR: #800000">"./scripts/interop/gc.spread.excelio.x.xx.xxxxx.x.min.js"</span>&gt;&lt;/script&gt;
</pre>
                </td>
            </tr>
        </tbody>
    </table>
</div>

<div class="i-filtered-content-JavaScript" data-title="JavaScript" data-itemid="JavaScript">
    <table class="i-syntax-table">
        <tbody>
            <tr>
                <th>JavaScript</th>

                <th>
                    <div class="i-copy-code-wrapper">
                        <span class="i-copy-code">Copy Code</span>
                    </div>
                </th>
            </tr>

            <tr>
                <td class="i-code" colspan="2">
                    <p>&lt;!DOCTYPE html&gt;<br />
                    &lt;html lang="en"&gt;<br />
                    &lt;head&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;title&gt;SpreadJS V11 Client Side ExcelIO&lt;/title&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2014-11-29/FileSaver.min.js"&gt;&lt;/script&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;link href="./css/gc.spread.sheets.excel2013white.12.0.0.css" rel="stylesheet"/&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;script src="./scripts/gc.spread.sheets.all.12.0.0.min.js" type="application/javascript"&gt;&lt;/script&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;!--For client-side excel i/o--&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;script src="./scripts/interop/gc.spread.excelio.12.0.0.min.js"&gt;&lt;/script&gt;<br />
                    &lt;/head&gt;<br />
                    &lt;body&gt;<br />
                    &lt;div&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;input type="file" name="files[]" id="fileDemo" accept=".xlsx,.xls"/&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;input type="button" id="loadExcel" value="Import" onclick="ImportFile()"/&gt;&nbsp;&nbsp;&nbsp;<br />
                    &nbsp;&nbsp;&nbsp; &lt;input type="button" class="btn btn-default" id="saveExcel" value="Export" onclick="ExportFile()"/&gt;<br />
                    &lt;input type="text" id="exportFileName" placeholder="Export file name" class="form-control" value="export.xlsx"/&gt;<br />
                    &nbsp;&nbsp;&nbsp; &lt;div id="ss" style="width:100%;height:500px"&gt;&lt;/div&gt;<br />
                    &lt;/div&gt;<br />
                    &lt;/div&gt;<br />
                    &lt;/body&gt;<br />
                    &lt;script&gt;</p>

                    <p>&nbsp;&nbsp;&nbsp; var workbook, excelIO;<br />
                    window.onload = function () {<br />
                    workbook = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));<br />
                    excelIO = new GC.Spread.Excel.IO();<br />
                    &nbsp;&nbsp;&nbsp; }</p>

                    <p>&nbsp;&nbsp;&nbsp; function ImportFile() {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var excelFile = document.getElementById("fileDemo").files[0];<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; excelIO.open(excelFile, function (json) {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var workbookObj = json;<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workbook.fromJSON(workbookObj);<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, function (e) {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console.log(e);<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br />
                    &nbsp;&nbsp;&nbsp; }</p>

                    <p>&nbsp;&nbsp;&nbsp; function ExportFile() {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var fileName = document.getElementById("exportFileName").value;<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (fileName.substr(-5, 5) !== '.xlsx') {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fileName += '.xlsx';<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var json = JSON.stringify(workbook.toJSON());<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; excelIO.save(json, function (blob) {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; saveAs(blob, fileName);<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, function (e) {<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console.log(e);<br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br />
                    &nbsp;&nbsp;&nbsp; }<br />
                    &lt;/script&gt;<br />
                    &lt;/html&gt;</p>
                </td>
            </tr>
        </tbody>
    </table>
</div><!--DXMETADATA end-->
            <a name="seealsobookmark"></a>
            <!--DXMETADATA start type="FilteredItemList" scrap="CATEGORISED_LINKS" namespace="linkcategory" source="Item" filter="" NoHeader="True" NoFooter="True" format="%%replaceinquotes:value=false%%%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=seealso,caption=""%%phrase:name=SeeAlso%%%%designlist:tagidentifier=seealso,itemtype=See Also%%""%%%%filtereditemlist%%</div>"--><!--DXMETADATA end-->
            
            <div id="i-footer-content" class="i-footer-content">
                <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_FOOTER" --><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="CopyrightNotice" format="<p>&nbsp;</p><p>&nbsp;</p><hr style=""height: 1px"" /><p>%%variable%%</p>" --><p>&nbsp;</p><p>&nbsp;</p><hr style="height: 1px" /><p><p>Copyright © 2019 GrapeCity, Inc. All rights reserved.</p>
<p><a href="https://www.grapecity.com/en/forums/winforms-edition" target="_blank">Product Support Forum</a> | <a href="javascript:window.print()">Print this page</a></p>
<ul class="social">
<li><a href="https://www.facebook.com/GrapeCityUS/" target="_blank" class="facebook">&nbsp;</a></li>
<li><a href="https://twitter.com/GrapeCityUS" target="_blank" class="twitter">&nbsp;</a></li>
<li><a href="https://www.linkedin.com/company/grapecity" target="_blank" class="linkedin">&nbsp;</a></li>
</ul>
</p><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end-->
            </div>
        </div>
    </div>
        
    <script type="text/javascript">
        $(function () {
            var documentInstance = new Innovasys.Content.Document(document.body);
            documentInstance.load();
        });
    </script>
</body>
</html>
